<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <%--展示logo--%>
    <a class="navbar-brand" href="#"><img src="${pageContext.request.contextPath}/images/logo.png" height="30" alt="惠农网"></a>
    <%--选项卡--%>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <c:if test="${tag==1}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/index/manage">首页 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=1}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/index/manage">首页</a>
                </li>
            </c:if>
            <c:if test="${tag==2}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/user/list">用户 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=2}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/user/list">用户</a>
                </li>
            </c:if>
            <c:if test="${tag==3}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/product/list">商品 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=3}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/product/list">商品</a>
                </li>
            </c:if>
            <c:if test="${tag==4}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/order/list">订单 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=4}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/order/list">订单</a>
                </li>
            </c:if>
            <c:if test="${tag==5}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/comment/list">留言 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=5}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/comment/list">留言</a>
                </li>
            </c:if>
            <c:if test="${tag==6}">
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/news/list">新闻 <span class="sr-only">(current)</span></a>
                </li>
            </c:if>
            <c:if test="${tag!=6}">
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/news/list">新闻</a>
                </li>
            </c:if>
        </ul>
    </div>
    <%--右侧--%>
    <div class="my-2 my-lg-0">
            <span>尊敬的管理员：${user.euUserName}，您好！</span>
            <a href="${pageContext.request.contextPath}/f-index/index">返回前台首页</a>
    </div>
</nav>
<div class="w-100 align-middle">
    <div class="float-left">惠农网-管理后台</div>
    <div class="float-right" id="Date">2020年9月22日 08:00:00</div>
</div>
<div class="row w-100"></div>

<script type="text/javascript">
    window.onload=function(){
        setInterval(function(){
            var date=new Date();
            var year=date.getFullYear(); //获取当前年份
            var mon=date.getMonth()+1; //获取当前月份
            var da=date.getDate(); //获取当前日
            var day=date.getDay(); //获取当前星期几
            var show_day=['星期一','星期二','星期三','星期四','星期五','星期六','星期日'];
            var h=date.getHours(); //获取小时
            var m=date.getMinutes(); //获取分钟
            var s=date.getSeconds(); //获取秒
            var d=document.getElementById('Date');
            d.innerHTML=year+'年'+mon+'月'+da+'日'+' '+h+':'+m+':'+s;
        },1000)
    }
</script>